package com.hz.ys_system.action;


import com.hz.framework.MyAction.BaseAction;
import com.hz.framework.dao.CommonDao;
import com.hz.framework.util.DateUtil;
import com.hz.ys_system.dao.SystemDao;

/**
 * *****************************************************************************
 *               Copyright(c) 2010 by 哈尔滨华泽数码科技有限公司.
 *                       All rights reserved.
 *******************************************************************************
 *     File Name         :  com.hz.ys_system.action.AideManageAction.java
 *     Description(说明)	: 辅助信息 下拉选管理
 * -----------------------------------------------------------------------------
 *     No.        Date              Revised by           Description	
 *     			  Nov 19, 2011           HTT              Created
 *****************************************************************************
 */
public class AideManageAction extends BaseAction {

	private static final long serialVersionUID = 1L;
	
	private Object pagList = null;
	
	/**
	 * @author 韩飞
	 * @time Nov 17, 2011	
	 * @return
	 * @throws Exception 
	 * 方法功能: 下拉列选 管理
	 */
	public String AideManage() throws Exception {
		boolean selflag = true;
		boolean pagflag = false;
		String rn = "";
		SystemDao sd = new SystemDao();
		String operate = CommonDao.isnull(request.getParameter("operate"));
//		录入页面进入
		if("inspage".equals(operate)){
			
			request.setAttribute("createtime", DateUtil.getTime());
			rn = "inspage";
			selflag = false;
		}
//		保存信息
		if("insinfo".equals(operate)){
			
			sd.DoSaveSelectInfo(request);
			request.setAttribute("createtime", DateUtil.getTime());
			rn = "inspage";
			selflag = false;
		}
//		修改页面进入
		if("updpage".equals(operate)){
			
			sd.SelSelect_value(request);
			rn = "updpage";
			selflag = false;
		}
//		修改信息
		if("updinfo".equals(operate)){
			
			sd.DoSaveSelectInfo(request);
			request.setAttribute("createtime", DateUtil.getTime());
			rn = "updpage";
			selflag = false;
		}
//		删除信息
		if("delinfo".equals(operate)){
			sd.Del_Select(request);
		}
//		默认列表页面
		if(selflag){
			rn = SUCCESS;
			pagList = sd.SelSelect(request);
			pagflag = true;
		}
//		配置分页
		if(pagflag){
			doAllSearchList(request, "value", pagList, "jdbc");
		}
		
		return rn;
	}
	

}
